
#ifndef DRAWSTRIPESHAPENOTE_H
#define DRAWSTRIPESHAPENOTE_H

#include <BButtonGroup>
#include <BCheckBox>
#include <BRadioBox>

#include "../notes/Note.h"
#include "AdsorbVertexPicker.h"
#include "EdgePicker.h"

class DrawLineStripeNote : public Note
{
	BOBJECT(DrawLineStripeNote)
public:
	enum OperaMode
	{
		OMode_None,
		OMode_Draw,
		OMode_Edit,
		OMode_Pick,
		OMode_Max
	};

public:
	DrawLineStripeNote(BWidget* parent = 0);
	~DrawLineStripeNote();

	void setOperaMode(OperaMode operaMode);
	OperaMode operaMode() const;

	void updateButtonStatus();

	virtual BSize sizeHint() const;

protected:
	void slotPropertyChanged(BObject* object, const BValue& value);
	void slotModeButtonToggled(BObject* object, const BValue& value);
	void slotVerticalButtonClicked(BObject* object, const BValue& value);
	void slotHorizontalButtonClicked(BObject* object, const BValue& value);
	void slotUprightButtonClicked(BObject* object, const BValue& value);
	void slotAdsorbPointButtonToggled(BObject* object, const BValue& value);
	void slotAdsorbMiddleButtonToggled(BObject* object, const BValue& value);
	void slotAdsorbCenterButtonToggled(BObject* object, const BValue& value);

	void slotHandlerChanged(BObject* object, const BValue& value);
	void slotOkButtonClicked(BObject* object, const BValue& value);
	void slotCancelButtonClicked(BObject* object, const BValue& value);
	void slotApplyButtonClicked(BObject* object, const BValue& value);

protected:
	virtual void showEvent(const BEvent& event);

	virtual void styleEvent(const BEvent& event);

private:
	BButtonGroup*		_modeButtonGroup;
	BRadioBox*			_drawRadioBox;
	BRadioBox*			_editRadioBox;
	BRadioBox*			_pickRadioBox;

	BButton*			_verticalButton;
	BButton*			_horizontalButton;
	BButton*			_uprightButton;
	BButton*			_adsorbPointButton;
	BButton*			_adsorbMiddleButton;
	BButton*			_adsorbCenterButton;

	BButton*			_okButton;
	BButton*			_cancelButton;
	BButton*			_applyButton;

	AdsorbVertexPicker*			_picker;
	Primitive				_primitive;
	BHolder<BVectorArray>	_vertices;
	BHolder<BIntArray>	_indices;

};

#endif
